package com.asset.salesforce.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Index;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;
@SuppressWarnings("serial")
@Entity
@Table(name="lead")
@Indexed
public class Lead implements Serializable{
	
 private Integer id;
 private Employee leadOwner;
 private String fName;
 private String lName; 
 private String companyName;
 private String title;
 private String phone;
 private String mobile;
 private String leadStatus;
 private String email;
 private String rating;
 private City city;
 private String webSite;
 private Integer numOfEmp;
 private Integer annualRevenue; 
 private String description;
 private String leadSource;
 private String industry;
 private Boolean isConverted;
 private Country country;
 private String zipCode;
 private String street;
 private String state;
 private Boolean isDeleted;
 private Date date;
 private Boolean isFollowed;
 private String carsNum; 
 private String category; 
 private String inOutBound; 
 
 private Date dateCreated;
 private Date dateModified;

 private String importedleadId;
 private String hasAppointment;
 private String hasCall;
 
/**
 * @return the id
 */
 	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="lead_id_seq")
	@SequenceGenerator(name="lead_id_seq",sequenceName="lead_id_seq",allocationSize=1)
public Integer getId() {
	return id;
}
/**
 * @param id the id to set
 */
public void setId(Integer id) {
	this.id = id;
}
/**
 * @return the leadOwnerId
 */
@ManyToOne
@JoinColumn(name="lead_owner_id")
public Employee getLeadOwner() {
	return leadOwner;
}
/**
 * @param leadOwnerId the leadOwnerId to set
 */
public void setLeadOwner(Employee leadOwner) {
	this.leadOwner = leadOwner;
}
/**
 * @return the fName
 */
@Column(name="f_name")
@Field(index=Index.YES,store=Store.NO)
  
public String getfName() {
	return fName;
}
/**
 * @param fName the fName to set
 */
public void setfName(String fName) {
	this.fName = fName;
}
/**
 * @return the lName
 */
@Column(name="l_name")
@Field(index=Index.YES,store=Store.NO)
  
public String getlName() {
	return lName;
}
/**
 * @param lName the lName to set
 */
public void setlName(String lName) {
	this.lName = lName;
}
/**
 * @return the companyName
 */
@Column(name="company_name")
@Field(index=Index.YES,store=Store.NO)
  
public String getCompanyName() {
	return companyName;
}
/**
 * @param companyName the companyName to set
 */
public void setCompanyName(String companyName) {
	this.companyName = companyName;
}
/**
 * @return the title
 */
@Column(name="title")
@Field(index=Index.YES,store=Store.NO)
  
public String getTitle() {
	return title;
}
/**
 * @param title the title to set
 */
public void setTitle(String title) {
	this.title = title;
}
/**
 * @return the phone
 */
@Column(name="phone")
@Field(index=Index.YES,store=Store.NO)
  
public String getPhone() {
	return phone;
}
/**
 * @param phone the phone to set
 */
public void setPhone(String phone) {
	this.phone = phone;
}
/**
 * @return the leadStatusId
 */

@Column(name="lead_status")
public String getLeadStatus() {
	return leadStatus;
}
/**
 * @param leadStatusId the leadStatusId to set
 */
public void setLeadStatus(String leadStatus) {
	this.leadStatus = leadStatus;
}
/**
 * @return the email
 */
@Column(name="email")
@Field(index=Index.YES,store=Store.NO)
  
public String getEmail() {
	return email;
}
/**
 * @param email the email to set
 */
public void setEmail(String email) {
	this.email = email;
}
/**
 * @return the ratingId
 */

@Column(name="rating")
public String getRating() {
	return rating;
}
/**
 * @param ratingId the ratingId to set
 */
public void setRating(String rating) {
	this.rating = rating;
}
/**
 * @return the cityId
 */
@ManyToOne
@JoinColumn(name="city_id")
public City getCity() {
	return city;
}
/**
 * @param cityId the cityId to set
 */
public void setCity(City city) {
	this.city = city;
}
/**
 * @return the webSite
 */
@Column(name="website")
@Field(index=Index.YES,store=Store.NO)
  
public String getWebSite() {
	return webSite;
}
/**
 * @param webSite the webSite to set
 */
public void setWebSite(String webSite) {
	this.webSite = webSite;
}
/**
 * @return the numOfEmp
 */
@Column(name="no_of_emp")
public Integer getNumOfEmp() {
	return numOfEmp;
}
/**
 * @param numOfEmp the numOfEmp to set
 */
public void setNumOfEmp(Integer numOfEmp) {
	this.numOfEmp = numOfEmp;
}
/**
 * @return the annualRevenue
 */
@Column(name="annual_revenue")
public Integer getAnnualRevenue() {
	return annualRevenue;
}
/**
 * @param annualRevenue the annualRevenue to set
 */
public void setAnnualRevenue(Integer annualRevenue) {
	this.annualRevenue = annualRevenue;
}
/**
 * @return the description
 */
@Column(name="description")
@Field(index=Index.YES,store=Store.NO)
  
public String getDescription() {
	return description;
}
/**
 * @param description the description to set
 */
public void setDescription(String description) {
	this.description = description;
}
/**
 * @return the leadSourceId
 */

@Column(name="lead_source")
public String getLeadSource() {
	return leadSource;
}
/**
 * @param leadSourceId the leadSourceId to set
 */
public void setLeadSource(String leadSource) {
	this.leadSource = leadSource;
}
/**
 * @return the industryId
 */

@Column(name="industry")
public String getIndustry() {
	return industry;
}
/**
 * @param industryId the industryId to set
 */
public void setIndustry(String industry) {
	this.industry = industry;
}
/**
 * @return the isConverted
 */
@Column(name="is_converted")
public Boolean getIsConverted() {
	return isConverted;
}
/**
 * @param isConverted the isConverted to set
 */
public void setIsConverted(Boolean isConverted) {
	this.isConverted = isConverted;
}
/**
 * @return the countryId
 */
@ManyToOne
@JoinColumn(name="country_id")
public Country getCountry() {
	return country;
}
/**
 * @param countryId the countryId to set
 */
public void setCountry(Country country) {
	this.country = country;
}
/**
 * @return the zipCode
 */
@Column(name="zip_code")
@Field(index=Index.YES,store=Store.NO)
  
public String getZipCode() {
	return zipCode;
}
/**
 * @param zipCode the zipCode to set
 */
public void setZipCode(String zipCode) {
	this.zipCode = zipCode;
}
/**
 * @return the street
 */
@Column(name="street")
@Field(index=Index.YES,store=Store.NO)
  
public String getStreet() {
	return street;
}
/**
 * @param street the street to set
 */
public void setStreet(String street) {
	this.street = street;
}
/**
 * @return the state
 */
@Column(name="state")
@Field(index=Index.YES,store=Store.NO)
  
public String getState() {
	return state;
}
/**
 * @param state the state to set
 */
public void setState(String state) {
	this.state = state;
}
/**
 * @return the isDeleted
 */
@Column(name="is_deleted")
public Boolean getIsDeleted() {
	return isDeleted;
}
/**
 * @param isDeleted the isDeleted to set
 */
public void setIsDeleted(Boolean isDeleted) {
	this.isDeleted = isDeleted;
}
/**
 * @return the date
 */
public Date getDate() {
	return date;
}
/**
 * @param date the date to set
 */
public void setDate(Date date) {
	this.date = date;
}
@Transient
public Boolean getIsFollowed() {
	return isFollowed;
}
public void setIsFollowed(Boolean isFollowed) {
	this.isFollowed = isFollowed;
}

@Column(name="category")
public String getCategory() {
	return category;
}
public void setCategory(String category) {
	this.category = category;
}

@Column(name="in_out_bound")
public String getInOutBound() {
	return inOutBound;
}
public void setInOutBound(String inOutBound) {
	this.inOutBound = inOutBound;
}

@Column(name="need_num")
public String getCarsNum() {
	return carsNum;
}
public void setCarsNum(String carsNum) {
	this.carsNum = carsNum;
}
/**
 * @return the dateCreated
 */
@Temporal(value = TemporalType.TIMESTAMP)
@Column(name="date_created")
public Date getDateCreated() {
	return dateCreated;
}
/**
 * @param dateCreated the dateCreated to set
 */
public void setDateCreated(Date dateCreated) {
	this.dateCreated = dateCreated;
}
/**
 * @return the dateModified
 */
@Temporal(value = TemporalType.TIMESTAMP)
@Column(name="date_modified")
public Date getDateModified() {
	return dateModified;
}

/**
 * @param dateModified the dateModified to set
 */
public void setDateModified(Date dateModified) {
	this.dateModified = dateModified;
}
/**
 * @return the mobile
 */
@Column(name="mobile")
public String getMobile() {
	return mobile;
}
/**
 * @param mobile the mobile to set
 */
public void setMobile(String mobile) {
	this.mobile = mobile;
}
/**
 * @return the importedleadId
 */
@Column(name="imported_lead_id")
public String getImportedleadId() {
	return importedleadId;
}
/**
 * @param importedleadId the importedleadId to set
 */
public void setImportedleadId(String importedleadId) {
	this.importedleadId = importedleadId;
}
/**
 * @return the hasAppointment
 */
@Column(name="has_appointment")
public String getHasAppointment() {
	return hasAppointment;
}
/**
 * @param hasAppointment the hasAppointment to set
 */
public void setHasAppointment(String hasAppointment) {
	this.hasAppointment = hasAppointment;
}
/**
 * @return the hasCall
 */
@Column(name="has_call")
public String getHasCall() {
	return hasCall;
}
/**
 * @param hasCall the hasCall to set
 */
public void setHasCall(String hasCall) {
	this.hasCall = hasCall;
}
/* (non-Javadoc)
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
	return "Lead [id=" + id + ", leadOwner=" + leadOwner + ", fName=" + fName
			+ ", lName=" + lName + ", companyName=" + companyName + ", title="
			+ title + ", phone=" + phone + ", mobile=" + mobile
			+ ", leadStatus=" + leadStatus + ", email=" + email + ", rating="
			+ rating + ", city=" + city + ", webSite=" + webSite
			+ ", numOfEmp=" + numOfEmp + ", annualRevenue=" + annualRevenue
			+ ", description=" + description + ", leadSource=" + leadSource
			+ ", industry=" + industry + ", isConverted=" + isConverted
			+ ", country=" + country + ", zipCode=" + zipCode + ", street="
			+ street + ", state=" + state + ", isDeleted=" + isDeleted
			+ ", date=" + date + ", isFollowed=" + isFollowed + ", carsNum="
			+ carsNum + ", category=" + category + ", inOutBound=" + inOutBound
			+ ", dateCreated=" + dateCreated + ", dateModified=" + dateModified
			+ "]";
}



}
